

void UI_DlgCircle::setCircle(PF_Circle& c) {
    circle = &c;
    //pen = circle->getPen();
    wPen->setPen(circle->getPen(false), true, false, "Pen");
    PF_Graphic* graphic = circle->getGraphic();
    if (graphic!=NULL) {
        cbLayer->init(*(graphic->getLayerList()), false, false);
    }
    PF_Layer* lay = circle->getLayer(false);
    if (lay!=NULL) {
        cbLayer->setLayer(*lay);
    }
    QString s;
    s.setNum(circle->getCenter().x);
    leCenterX->setText(s);
    s.setNum(circle->getCenter().y);
    leCenterY->setText(s);
    s.setNum(circle->getRadius());
    leRadius->setText(s);
}

void UI_DlgCircle::updateCircle() {
    circle->setCenter(PF_Vector(PF_Math::eval(leCenterX->text()),
                                  PF_Math::eval(leCenterY->text())));
    circle->setRadius(PF_Math::eval(leRadius->text()));
    circle->setPen(wPen->getPen());
    circle->setLayer(cbLayer->currentText());
    circle->calculateBorders();
}

